<!-- 会员评价表表单弹窗 -->
<form id="orderevaluate-form" lay-filter="orderevaluate-form" class="layui-form model-form" style="overflow:auto; height:500px;width:90%;">
    <input name="id" type="hidden"/>
    				    <div class="layui-form-item">
        <label class="layui-form-label">关联订单</label>
        <div class="layui-input-block">
            <input name="orderId" placeholder="请输入订单ID" type="text" class="layui-input" maxlength="20"  id="orderId"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">会员名称</label>
        <div class="layui-input-block">
            <input name="memberId" placeholder="请输入会员ID" type="text" class="layui-input layui-hide" maxlength="20"  id="memberId"
                   lay-verify="required" required/>
            <input name="memberNickName" placeholder="请输入会员ID" type="text" class="layui-input" maxlength="20"  id="memberNickName"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">大师名称</label>
        <div class="layui-input-block">
            <input name="teacherId" placeholder="请输入大师ID" type="text" class="layui-input layui-hide" maxlength="20"  id="teacherId"
                   lay-verify="required" required/>
            <input name="teacherNickName" placeholder="请输入大师名称" type="text" class="layui-input" maxlength="20"  id="teacherNickName"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">评价内容</label>
        <div class="layui-input-block">
            <input name="content" placeholder="请输入评价内容" type="text" class="layui-input" maxlength="20"  id="content"
                   lay-verify="required" readonly required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">创建时间</label>
        <div class="layui-input-block">
            <!--<input name="createDate" placeholder="请输入创建时间" type="text" class="layui-input" maxlength="20"  id="createDate"-->
                   <!--lay-verify="required" required/>-->
            <label class="layui-form-label" style="width: 180px;text-align: left;" name="createDate"  id="createDate"></label>
        </div>
    </div>
     <div class="layui-form-item model-form-footer">
        <button class="layui-btn layui-btn-primary" ew-event="closeDialog" type="button">取消</button>
        <!--<button class="layui-btn" lay-filter="user-form-submit" lay-submit>保存</button>-->
    </div>
</form>

<script>
    layui.use(['layer', 'admin', 'form', 'formSelects'], function () {
        var layer = layui.layer;
        var admin = layui.admin;
        var form = layui.form;
        var formSelects = layui.formSelects;
 
        var orderevaluate = admin.getTempData('t_orderevaluate');
           if (orderevaluate.method=="update"){
               $("#createDate").text(orderevaluate.createDate);
        	form.val('orderevaluate-form', orderevaluate);
            form.render();
        }
        // 表单提交事件
        form.on('submit(user-form-submit)', function (data) {
             layer.load(2);
            
            admin.req('order/orderevaluate/'+orderevaluate.method, JSON.stringify(data.field), function (data) {
                layer.closeAll('loading');
                if (data.code == 0) {
                    layer.msg(data.msg, {icon: 1, time: 500});
                    admin.finishPopupCenter();
                } else {
                    layer.msg(data.msg, {icon: 2, time: 500});
                }
            }, "post");  
            return false;
        });
    });
</script>
